package com.qujia.station.mapper;

import java.math.BigDecimal;
import java.sql.Time;
import java.util.List;
import java.util.Map;

import com.qujia.station.domain.*;
import com.qujia.station.domain.dto.OilEngineDto;
import com.qujia.station.domain.dto.OilEngineSumDto;
import com.qujia.station.domain.vo.StationClassTimeVo;
import com.qujia.station.domain.vo.changeClassSettlement4User;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * 班结Mapper接口
 * 
 * @author qujia
 * @date 2021-11-27
 */
@Repository
public interface ClassSettlementMapper 
{
    /**
     * 查询班结
     * 
     * @param classSettlementId 班结ID
     * @return 班结
     */
    public ClassSettlement selectClassSettlementById(Long classSettlementId);

    /**
     * 查询班结列表
     * 
     * @param classSettlement 班结
     * @return 班结集合
     */
    public List<ClassSettlement> selectClassSettlementList(ClassSettlement classSettlement);

    List<OilOmeter> selectByStationId(Long StationId);

    int insertSelective(OilOmeter record);
    /**
     * 查询班结汇总列表
     *
     * @param classSettlement 班结
     * @return 班结集合
     */
    public List<ClassSettlement> selectClassSettlementSummaryList(ClassSettlement classSettlement);

    public List<BusinessDailyReport> selectBusinessDailyReportList(ClassSettlement classSettlement);

    public BusinessDailyReport selectBusinessDailyReportSum(ClassSettlement classSettlement);

    public List<ReportSettlement> selectReportClassList(ClassSettlement classSettlement);

    public ClassSettlementCard queryPhysicalCard(Map<String, Object> params);

    public ClassSettlementCard queryPhysicalCardInXj(Map<String, Object> params);

    public ClassSettlementCard queryPhysicalCardInWxPos(Map<String, Object> params);

    public ClassSettlementCard queryPhysicalCardInRef(Map<String, Object> params);

    public List<ClassSettlementCard> homePhysical(Map<String, Object> params);


    public String queryOrderPayType(Map<String, Object> params);

    public ClassSettlementCard queryDzkCard(Map<String, Object> params);

    public List<ClassSettlementCard> homeDzkCard(Map<String, Object> params);

    public ClassSettlementCard queryPhysicalCardRef(Map<String, Object> params);

    public List<ClassSettlementCard>  homePhysicalRef(Map<String, Object> params);

    public int getAllNewPeople(Map<String, Object> params);



    public ClassSettlementCard forKillCouponAmt(Map<String, Object> params);

    public ClassSettlementCard forSaleActivityAmt(Map<String, Object> params);

    public ClassSettlementCard refSaleActivityAmt(Map<String, Object> params);

    public ClassSettlementCard saleActivityAmtClass(Map<String, Object> params);

    public ClassSettlementCard employeeForKillCouponAmt(Map<String, Object> params);

    public ClassSettlementCard queryFleetCard(Map<String, Object> params);

    public List<ClassSettlementCard> homeFleet(Map<String, Object> params);

    public int queryIntegral(Map<String, Object> params);

    public int queryWriteOffIntegral(Map<String, Object> params);

    public ClassSettlementCard querySuperPay(Map<String, Object> params);

    public  List<ClassSettlementCard> homeSuperPay(Map<String, Object> params);

    public ClassSettlementCard queryRefundSuperPay(Map<String, Object> params);


    public ClassSettlement selectClassSettlementSummary(ClassSettlement classSettlement);

    public ReportSettlement selectClassReportmentSummary(ClassSettlement classSettlement);
    public BigDecimal totalWordCount(ClassSettlement classSettlement);


    public List<ClassSettlement> selectClassSettlementSummary4POSList(Map<String,Object> params);

    public List<ClassSettlementOilmachine> selectAllClassSettlementOilmachines(String classNo);
    /**
     * 新增班结
     * 
     * @param classSettlement 班结
     * @return 结果
     */
    public int insertClassSettlement(ClassSettlement classSettlement);

    /**
     * 新增日报表
     *
     * @param classSettlement 班结
     * @return 结果
     */
    public int insertClassReport(ClassSettlement classSettlement);

    /**
     * 新增日报表
     *
     * @param businessDailyReport 班结
     * @return 结果
     */
    public int insertBusinessDailyReport(BusinessDailyReport businessDailyReport);


    public BusinessDailyReport  selectBusinessDailyReport( Map<String, Object> params);
    /**
     * 修改班结
     * 
     * @param classSettlement 班结
     * @return 结果
     */
    public int updateClassSettlement(ClassSettlement classSettlement);

    /**
     * 删除班结
     * 
     * @param classSettlementId 班结ID
     * @return 结果
     */
    public int deleteClassSettlementById(Long classSettlementId);

    /**
     * 批量删除班结
     * 
     * @param classNo 需要删除的数据ID
     * @return 结果
     */
    public int deleteClassSettlementByClassNos(String[] classNo);

    public  int insertAboutOilEngine(List<Map<String, Object>> queryGroupByOilGun);

    public List<ClassSettlement> queryUntreatedData(Map<String,Object> params);

    public List<ClassSettlement> employeeQueryUntreatedData(Map<String,Object> params);

    public Map<String,Object> queryLastEndTime(Map<String,Object> params);

    public Map<String,Object> queryStartAndEnd(Map<String,Object> params);



    public List<ClassSettlement> querySummaryByClassNo(Map<String,Object> params);

    public List<ClassSettlement> querySummaryByClassNoForOrder(Map<String, Object> params);

    public List<ClassSettlement> employeeQuerySummaryByClassNoForOrder(Map<String, Object> params);

    public List<Map<String,Object>> queryGroupByOil(Map<String,Object> params);

    public List<Map<String,Object>> queryReportByOil(Map<String,Object> params);

    public List<Map<String, Object>> queryGroupByOilForOrder(Map<String, Object> params);

    public List<Map<String, Object>> employeeQueryGroupByOilForOrder(Map<String, Object> params);

    public List<Map<String, Object>> queryGroupByPayTypeForOrder(Map<String, Object> params);

    public List<Map<String, Object>> getShiftHandover(Map<String, Object> params);

    public List<Map<String, Object>> employeeQueryGroupByPayTypeForOrder(Map<String, Object> params);

    public List<Map<String, Object>> queryGroupRefundByPayTypeForOrder(Map<String, Object> params);

    public List<Map<String, Object>> employeeQueryGroupRefundByPayTypeForOrder(Map<String, Object> params);

    public List<Map<String,Object>> queryGroupByPayType(Map<String,Object> params);

    public List<Map<String,Object>> queryReportByPayType(Map<String,Object> params);

    public  List<Map<String, Object>> queryGroupByOilGunForOrder(Map<String, Object> params);

    public  List<Map<String, Object>> employeeQueryGroupByOilGunForOrder(Map<String, Object> params);

    public  List<OilEngineDto> classSettlementOilEngineSum(Map<String, Object> params);

    public  List<OilEngineDto> employeeClassSettlementOilEngineSum(Map<String, Object> params);

    public List<Map<String,Object>> queryGroupByOilGun(Map<String,Object> params);

    public List<Map<String,Object>> queryReportByOilGun(Map<String,Object> params);

    public List<Map<String,Object>> queryClassByNo(Map<String,Object> params);

    public List<Map<String,Object>> queryReportClassByNo(Map<String,Object> params);



    public List<Map<String,Object>> queryGroupByActivityForOrder(Map<String,Object> params);

    public List<Map<String,Object>> queryGroupByActivity(Map<String,Object> params);

    public List<changeClassSettlement4User> selectChange4User4POSListForOrder(Map<String, Object> params);

    public List<changeClassSettlement4User> select4UserListForOrder(Map<String, Object> params);

    public int addChange4User4POSListForOrder(changeClassSettlement4User changeClassSettlement4User);

    public List<Map<String,Object>> selectClassSettlement4User4POSListForOrder(Map<String, Object> params);

    public List<Map<String,Object>> employeeSelectClassSettlement4User4POSListForOrder(Map<String, Object> params);

    public List<Map<String,Object>> selectClassSettlement4User4POSList(Map<String, Object> params);

    //统计班结信息，按照支付方式进行集合
    public List<ClassSettlement> queryClassSettlementPayType(Map<String, Object> params);

    //统计班结信息，按照油品名称进行集合
    public List<ClassSettlement> queryClassSettlementOil(Map<String, Object> params);

    public String queryClassDayOrNight(Map<String, Object> params);

    public int getDayOrNightCount(Map<String, Object> params);



    //统计班结信息，按照加油员分类
    public List<ClassSettlement> selectClassSettlementSummaryUser(Map<String, Object> params);



    Integer updateClassSettlementStatusByClassNo(String classNo);

    void updateClassSettlementPrintStatus(String classNo);

    // 根据station_id修改白班时间
    public int updateDayShiftTimeByStationId(Map<String, Object> params);

    // 根据station_id查看白班时间
    public StationClassTimeVo selectDayShiftTimeByStationId(Integer stationId);

    // 根据EnterpriseId修改白班时间
    public  int updateDayShiftTimeByEnterpriseId(Map<String, Object> params);

    // 根据EnterpriseId查看白班时间
    public StationClassTimeVo selectDayShiftTimeByEnterpriseId(Integer enterpriseId);

    // 会员卡支付（电子卡支付）
    Map<String,Object> employeeSelectDzkPayOrder(Map<String, Object> params);
}
